@Repository
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th=
        "http://www.thymeleaf.org" lang="en">
<head th:replace="fragments/header :: head">
</head>
<body>
<div class="container">
  <div class="row justify-content-center">
    <div class="col-6">
      <div class="alert alert-success" th:if="${successMessage}" th:
           utext="${successMessage}">
      </div>
      <form name="bookForm" role="form" method="post" th:object=
              "${bookForm}" th:action="@{/books/edit}" enctype=
                    "multipart/form-data">
        <h3 class="text-center">编辑图书信息</h3>
        <div class="form-group">
          <label for="id">ID</label>
          <input type="text" class="form-control" id="id" name="id"
                 th:field="*{bookId}" readonly/>
        </div>
        <div class="form-group">
          <label class="form-control-label" for="field_bookName">图书名称</label>
          <input type="text" class="form-control" name="bookName" id=
                  "field_bookTitle" required th:field="*{bookName}"/>
        </div>
        <div class="form-group">
          <label class="form-control-label" for="field_bookAuthor">图书作者</label>
          <input type="text" class="form-control" name="bookAuthor" id=
                  "field_bookAuthor" required th:field="*{bookAuthor}"/>
        </div>
        <div class="form-group">
          <label class="form-control-label" for="field_bookPages">出版社
          </label>
          <input type="text" class="form-control" name="bookPublisher" id=
                  "field_bookPublisher" required
                 th:field="*{bookPublisher}"/>
        </div>
        <div class="form-group">
          <label class="form-control-label" for="field_bookIsbn">图书
            ISBN</label>
          <input type="text" class="form-control" name="bookIsbn" id=
                  "field_bookIsbn" required th:field="*{bookIsbn}"/>
        </div>
        <div class="form-group">
          <label class="form-control-label" for="field_bookPrice">图书价格</label>
          <input type="number" class="form-control" name="bookPrice" id=
                  "field_bookPrice" required th:field="*{bookPrice}"/>
        </div>
        <div class="form-group">
          <label class="form-control-label" for="field_bookDescription">图书
            简介</label>
          <textarea class="form-control" name="bookDescription" id=
                  "field_bookDescription" required th:field="*{bookDescription}">
</textarea>
        </div>
        <div class="form-group">
          <label class="form-control-label" for="field_bookImage">图书缩略图
          </label>
          <div>
            <img height="100px" th:src="@{|/bookImage?bookId=${bookForm.
bookId}|}"/>
          </div>
        </div>
        <div class = "col-12 text-right">
          <a type="button" class="btn btn-secondary" th:href=
                  "@{/books}">返回</a>
          <button type="submit" class="btn btn-primary">提交
          </button>
        </div>
      </form>
    </div>
  </div>
</div>
</body>
</html>